package com.tusuo.stds.rest;

import org.parceler.Parcel;

import java.util.List;

/**
 * @author J.Huang
 * @version 1.0
 *
 */

public class SceneList extends ApiResult {

    public int Total;
    public List<Scene> Data;

    @Parcel
    public static class Scene {
        public static final String EXTRA_NAME = Scene.class.getName();

        public int Id;
        public String Title;
        public String ImageUrl;
        public String Description;
        public int JoinCount;
        public int LockStatus;
        public int CompleteType;
        public boolean IsHidden;
        public int SortIndex;

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (!(o instanceof Scene)) return false;
            Scene scene = (Scene) o;
            if (Id != scene.Id) return false;
            if (JoinCount != scene.JoinCount) return false;
            if (LockStatus != scene.LockStatus) return false;
            if (CompleteType != scene.CompleteType) return false;
            if (IsHidden != scene.IsHidden) return false;
            if (Title != null ? !Title.equals(scene.Title) : scene.Title != null) return false;
            if (ImageUrl != null ? !ImageUrl.equals(scene.ImageUrl) : scene.ImageUrl != null)
                return false;
            return Description != null ? Description.equals(scene.Description) : scene.Description == null;

        }

        @Override
        public String toString() {
            return "Scene{" +
                    "Id=" + Id +
                    ", Title='" + Title + '\'' +
                    ", ImageUrl='" + ImageUrl + '\'' +
                    ", Description='" + Description + '\'' +
                    ", JoinCount=" + JoinCount +
                    ", LockStatus=" + LockStatus +
                    ", CompleteType=" + CompleteType +
                    ", IsHidden=" + IsHidden +
                    ", SortIndex=" + SortIndex +
                    '}';
        }
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        SceneList sceneList = (SceneList) o;

        if (Total != sceneList.Total) return false;
        return Data.equals(sceneList.Data);
    }

    @Override
    public String toString() {
        return "SchoolList{" +
                "Total=" + Total +
                ", Data=" + Data +
                '}';
    }
}
